{% extends "FOSUserBundle::layout.html.twig" %}

{% trans_default_domain 'FOSUserBundle' %}

{% block fos_user_content %}
    <div class="panel panel-default">
        <div class="panel-heading">{{ 'layout.login'|trans({}, 'FOSUserBundle') }}</div>
        <div class="panel-body">
            {% if error %}
            <div class="alert alert-danger" role="alert">
                <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
                {{ error.messageKey|trans(error.messageData, 'security') }}
            </div>
            {% endif %}
            <form class="form-horizontal" novalidate action="{{ path("fos_user_security_check") }}" method="post">
                <input type="hidden" name="_csrf_token" value="{{ csrf_token }}"/>
                <div class="form-group">
                    <label for="username" class="col-sm-2 control-label">{{ 'security.login.username'|trans }}</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="username" name="_username"
                               value="{{ last_username }}" required="required"
                               placeholder="{{ 'security.login.username'|trans }}"/>
                    </div>
                </div>
                <div class="form-group">
                    <label for="password" class="col-sm-2 control-label">{{ 'security.login.password'|trans }}</label>
                    <div class="col-sm-10">
                        <input type="password" class="form-control" id="password" name="_password" required="required"
                               placeholder="{{ 'security.login.password'|trans }}"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <div class="checkbox">
                            <label>
                                <input type="checkbox" id="remember_me" name="_remember_me"
                                       value="on"/> {{ 'security.login.remember_me'|trans }}
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <input type="submit" id="_submit" name="_submit" style="margin-right:15px" class="btn btn-primary"
                               value="{{ 'security.login.submit'|trans }}"/>
                        <a href="{{ path('fos_user_resetting_request') }}">{{ 'resetting.request.submit'|trans }}</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
{% endblock fos_user_content %}
